import CryptoJS from 'crypto-js'

const content = '需解密的内容' // 需解密的内容
const prekey = '密钥' //密钥
const decodeContent = decodeURIComponent(content)
const key = CryptoJS.enc.Utf8.parse(prekey)
const bytes = CryptoJS.AES.decrypt(decodeContent, key, {
    iv: '',
    mode: CryptoJS.mode.ECB,
    padding: CryptoJS.pad.ZeroPadding
})
const result = CryptoJS.enc.Utf8.stringify(bytes).trim() // trim 去除多余空格
